package org.ky.generator.util;

import com.alibaba.fastjson.JSON;

/**
 * 表名打印辅助工具
 * 
 * @author K.y
 *
 */
public class TablePrintHelper {
	protected String[] tablesName;
	protected int tableCount;

	private TablePrintHelper(String... tablesName) {
		this.tablesName = tablesName;
		if (tablesName == null || tablesName.length == 0) {
			this.tableCount = 0;
		} else {
			this.tableCount = tablesName.length;
		}
	}

	public static TablePrintHelper getInstance(String... tablesName) {
		return new TablePrintHelper(tablesName);
	}

	public String[] getTablesName() {
		return tablesName;
	}

	public void setTablesName(String[] tablesName) {
		this.tablesName = tablesName;
	}

	public int getTableCount() {
		return tableCount;
	}

	public void setTableCount(int tableCount) {
		this.tableCount = tableCount;
	}

	@Override
	public String toString() {
		return JSON.toJSONString(this);
	}
}
